package net.oschina.app.fragment.general;

import net.oschina.app.R;
import net.oschina.app.base.BasePagerAdapter;
import net.oschina.app.base.BaseFragment;
import net.oschina.app.viewpagerfragment.general.BlogFragment;
import net.oschina.app.viewpagerfragment.general.HotFragment;
import net.oschina.app.viewpagerfragment.general.NewsFragment;
import net.oschina.app.viewpagerfragment.general.RecommendFragment;

/**
 * Created by Shinelon on 2017/1/13.
 */

public class GeneralFragment extends BaseFragment {

    @Override
    public int getLayoutRes() {
        return R.layout.fragment_general;
    }

    @Override
    public void initView() {
    }

    @Override
    public void initListener() {

    }

    @Override
    public void initData() {

        initViewPager();
    }

    private void initViewPager() {
        BasePagerAdapter adapter = new BasePagerAdapter(getChildFragmentManager(),mRoot);
        adapter.addTab(NewsFragment.class,"资讯");
        adapter.addTab(HotFragment.class,"热点");
        adapter.addTab(BlogFragment.class,"博客");
        adapter.addTab(RecommendFragment.class,"推荐");
    }
}
